<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="./favicon.ico">
    <title>签到</title>
    <link href="/public/css/bootstrap.min.css" rel="stylesheet">
    <script src="/public/js/jquery.min.js"></script>
    <script src="/public/js/bootstrap.min.js"></script>
    <style>
        body {
            padding-top: 50px;
            padding-bottom: 20px;
            background-color: #eee;
        }
        #back:hover {
            color: #4cae4c;
            font-size: 20px;
        }
    </style>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#" style="font-size: 25px; color: black">搜索结果</a>
            <a class="navbar-brand" href="#">总签到次数：{{rows.length}}次</a>
            <a class="navbar-brand" href="javascript:history.back(-1)" id="back">返回上一页</a>
        </div>
    </div>
</nav>

<div class="jumbotron">
    <div class="container" >
        <table class="table table-hover table-striped">
            <thead>
            <tr class="danger">
                <th>姓名</th>
                <th>签到时间</th>
                <th>签退时间</th>
                <th>在线时长</th>
                <th>签到总次数</th>
            </tr>
            </thead>
            <tbody>
            {% for row in rows%}
            <tr>
                <td>{{ row.name.toString() }}</td>
                <!--nodejs 存入的时间与模板解析的时间不一致-->
                <td>{{ row.signindate.toString()|date('Y-m-d H:m:s', -480) }}</td>
                <td>{{ row.signoutdate.toString()|date('Y-m-d H:m:s', -480)  }}</td>
                <td>{{ row.onlinetime }}</td>
                <td>{{ row.signintimes }}</td>
            </tr>
            {% endfor %}

            </tbody>
        </table>

        <!--分页 -->
        <!--<nav aria-label="Page navigation " style="text-align: center">-->
            <!--<ul class="pagination">-->
                <!--<li>-->
                    <!--<a href="#" aria-label="Previous">-->
                        <!--<span aria-hidden="true">&laquo; 上一页</span>-->
                    <!--</a>-->
                <!--</li>-->
                <!--<li><a href="#">1</a></li>-->
                <!--<li><a href="#">2</a></li>-->
                <!--<li><a href="#">3</a></li>-->
                <!--<li><a href="#">4</a></li>-->
                <!--<li><a href="#">5</a></li>-->
                <!--<li>-->
                    <!--<a href="#" aria-label="Next">-->
                        <!--<span aria-hidden="true">下一页 &raquo;</span>-->
                    <!--</a>-->
                <!--</li>-->
            <!--</ul>-->
        <!--</nav>-->
    </div>
</div>
</body>
</html>
